<!--添加用户表单-->
<div class="tab_edit_empty">
    <form action="{:Url('agent_authentication_submit')}" method="post" id="agent_authentication_submit">
        <input type="hidden" name="agent_id" value="{$agent_id}"/>
        <table width="100%" class="list">
            <tr>
                <td class="t_r t_left_w">信贷公司编号：</td>
                <td class="t_l">{$agent_info['agent_id']}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">营业执照：</td>
                <td class="t_l">{:widget('common/Images/img',array($agent_info["business_license_url"],500,300))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">信贷公司名称：</td>
                <td class="t_l">{$agent_info['agent_name']}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">所在省份：</td>
                <td class="t_l">{:widget('common/Name/area',array($agent_info["province_id"]))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">所在城市：</td>
                <td class="t_l">{:widget('common/Name/area',array($agent_info["city_id"]))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">所在区域：</td>
                <td class="t_l">{:widget('common/Name/area',array($agent_info["area_id"]))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">详细地址：</td>
                <td class="t_l">{$agent_info['address']}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">负责人姓名：</td>
                <td class="t_l">{$agent_admin_info['real']}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">负责人电话：</td>
                <td class="t_l">{$agent_admin_info['phone']}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">是否认证：</td>
                <td class="t_l">{:widget('common/Color/Color',array("is_authentication",$agent_info['is_authentication']))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">备注：</td>
                <td class="t_l">{$agent_info['remark']}</td>
            </tr>
            {eq name="agent_info['is_authentication']" value="1"}
                <tr>
                    <td class="t_r t_left_w">审核状态：</td>
                    <td class="t_l">{:widget('common/Radio/radio',array('is_authentication','is_authentication_temp',null,true))}</td>
                </tr>
                <tr>
                    <td class="t_r t_left_w">审核说明：</td>
                    <td class="t_l">{:widget('common/TextArea/text_area',array('authentication_note',$agent_info['authentication_note'],false,false,"width:800px;"))}</td>
                </tr>
                <tr>
                    <td class="t_r t_left_w"></td>
                    <td class="t_l">
                        <div class="btn"><input type="submit" class="but_blue" value="保存信息"></div>
                    </td>
                </tr>
            {/eq}
        </table>
    </form>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("#agent_authentication_submit").submit(function(){
            //判断是否选择是否
            if($("input[name='is_authentication']:checked").val() == 3){
                //判断是否填写失败理由
                if($.trim($("textarea[name='authentication_note']").val()) == ""){
                    alert("请填写认证失败说明！");
                    return false;
                }
            }

            //审核通过
            return true;
        });
    });
</script>
